package social.hub.oauth.scribe;

import org.scribe.builder.api.DefaultApi10a;
import org.scribe.model.Token;

import social.hub.oauth.OAuthServiceConfig;

public class GenericScribe10aAPI extends DefaultApi10a {

	private final OAuthServiceConfig serviceConfig;

	public GenericScribe10aAPI(OAuthServiceConfig serviceConfig) {
		this.serviceConfig = serviceConfig;
	}

	@Override
	public String getAccessTokenEndpoint() {
		return serviceConfig.getAccessTokenUrl();
	}

	@Override
	public String getAuthorizationUrl(Token requestToken) {
		return serviceConfig.getAuthorizeUrl();
	}

	@Override
	public String getRequestTokenEndpoint() {
		return serviceConfig.getRequestTokenUrl();
	}

}